package com.test.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.test.mapper.AgentMapper;
import com.test.pojo.Agent;
import com.test.service.AgentService;
@Service("agentService")
public class AgentServiceImpl implements AgentService {
	
	@Autowired
	AgentMapper agentMapper;
	
	public List<Agent> findAgent(int pageNow,int pageSize) {
		PageHelper.startPage(pageNow, pageSize);
		List<Agent> products = agentMapper.queryForList();
		return products;
	}
	
//	public Page<Agent> findAgent2(int pageNow,int pageSize) {
//		RowBounds rowBounds = Page.rowBounds(pageNow, pageSize);
//	    List<Agent> products = agentMapper.queryForList(rowBounds);
//	    return Page.asPage(rowBounds, products);
//	}
}
